package com.miku.blog.controller;

import com.miku.blog.annotation.SystemLog;
import com.miku.blog.domain.pojo.ResponseResult;
import com.miku.blog.domain.pojo.SystemConstance;
import com.miku.blog.service.PhotoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shkstart
 * @create ${}YEAR-06-09 1:34
 */
@Api(tags = "Blog[图片]")
@RestController
public class PhotoController {

    @Autowired
    private PhotoService photoService;


    @SystemLog(notes = "获取图片列表{前台博客系统}")
    @ApiOperation(value = "获取图片列表接口",notes = "根据相册ID 获取相关图片列表，分页展示 为删除的图片")
    @GetMapping("/albums/photos/{albumsId}")
    public ResponseResult getPhotos(@RequestParam("current") Integer current,
                                    @RequestParam("size") Integer size,
                                    @PathVariable("albumsId") Integer albumsId){
        return photoService.getPhotos(current,size,albumsId);
    }

}
